home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / jjbqc.zip / JJBSHOW2.C < prev    next >
C/C++ Source or Header  |  1993-01-04  |  5KB  |  117 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /***************************************************************************
  7.  *                                                                         *
  8.  *                           JJBSHOW2.C                                    *
  9.  *                                                                         *
  10.  *   Copyright (c) 1989, JJB. All rights reserved.                         *
  11.  *                                                                         *
  12.  *   This example shows you how to assign functions to options.            *
  13.  *                                                                         *
  14.  *                                                                         *
  15.  *                   'funct(functionname)'                                 *
  16.  *                                                                         *
  17.  *                                                                         *
  18.  *   Just glance and it and move on to example JJBSHOW3.C                  *
  19.  *                                                                         *
  20.  *   If you want to run this program, from DOS:                            *
  21.  *                                                                         *
  22.  *         Enter 'JJBS2'    ( to load this file with JJB.QLB)              *
  23.  *         Press 'F5'       ( to compile and begin executing)              *
  24.  *                                                                         *
  25.  *    If you have any problems, see JJBREAD.ME 'problems'.                 *
  26.  *    Otherwise you should be executing this program.                      *
  27.  *                                                                         *
  28.  *    You may press 'ALT' then select any option.                          *
  29.  *    The option selected will be displayed in the bottom left of screen.  *
  30.  *                                                                         *
  31.  *    JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635      *
  32.  ***************************************************************************/
  33.  
  34.  
  35. /***************************************************************************
  36.  *                                                                         *
  37.  * To make an .exe file JJBSHOW2.EXE for this program, from DOS enter:     *
  38.  *                                                                         *
  39.  *     QCL  /c  /AM  JJBSHOW2.C                                            *
  40.  *     LINK  JJBSHOW2.OBJ + JJB.OBJ,,, C:LIB\,                             *
  41.  *                                                                         *
  42.  ***************************************************************************/
  43.  
  44.  
  45. #include "c:\bin\jjbset.h"
  46.  
  47. /* see JJBGLOSS.DOC for an explanation of the JJB functions below       */
  48.  
  49.  
  50. main()
  51.   {
  52.     jjb_initalize();        /* initalizes JJB   */
  53.  
  54.     jjb_setup();            /* setup options & assign functions     */
  55.  
  56.     jjb_start();            /* start executing the default option   */
  57.  
  58.  
  59.   }
  60.  
  61.  
  62.  
  63.  
  64. /* The function below uses some of the functions in the JJB hidden library.*/
  65.  
  66. video_message() {
  67.     vclrw();         /* clear the window */
  68.     vloc(10,20);     /* position the video fast cursor */
  69.     vfsc("This message will appear on the screen.");
  70.     get_ch();
  71. }
  72.  
  73.  
  74.  
  75.  
  76.  
  77. /****************************************************************************
  78.  *                                                                          *
  79.  *                       jjb_setup()                                        *
  80.  *                                                                          *
  81.  *   jjb_setup() is where you should define how your pull down menus will   *
  82.  *   for each group and option of the group.                                *
  83.  *                                                                          *
  84.  *   This example shows you how to assign function names to options.        *
  85.  *                                                                          *
  86.  ****************************************************************************/
  87.  
  88.  
  89.  
  90. jjb_setup() {
  91.  
  92.     group("Update");
  93.        option("Video a message on the screen");
  94.           funct(video_message);
  95.        option("Update Customer file",DRAWLINE);
  96.        option("Miscellaneous");
  97.  
  98.  
  99.  
  100.     group("File");
  101.         option("Any option you want can be here");
  102.         option("Every group can have any number of options.");
  103.     group("More");
  104.         option("Call");
  105.         option("Create a new file");
  106.         option("These option descriptions");
  107.         option("  's'how you that you can");
  108.         option("  'n'ame each option.");
  109.  
  110.  
  111.  
  112.     }
  113.  
  114.  
  115.  
  116.  
  117.